The electrochemical phase transformation in LiXFePO4