move direction to class