Preparation of transition metal orthophosphates, MPO4, and their magnetic properties