fix a lot of bugs and add velocity&acceleration methods