added last movement variable