Corrected move particle to weight by occupation and added unittest