It is often difficult to know whether to use 'ie' or 'ei' to represent the 'ee' phoneme in a word.
For example, is it recieve or receive? You may have heard the saying 'i before e except after c', which holds true for most words. The correct spelling is receive, and the following words also contain the letters 'cei'.
However, there are exceptions to the rule. The following words are spelt 'ei' even though there is no 'c'.
There are also a number of words that use the 'ei' spelling to represent different sounds.
As usual, it is a case of learning which words follow the rule and which words don't!