save and restore velocity