Added socket client code for determining the movement values