update velocity always at the end of iteration