use player speed, fix memory error