added vector limit function and used in acceleration