implemented rest of momentum change after n iterations