code working with kinematics in its own function, live button implemented