move and rotate handling