swinging with input