Added loops for momentum/COM calculations