CoM calculations implemented -- needs testing