added velocity integration