changed getLenght to getLength
removed lock and added updatePhysic