Implemented acceleration and friction