new code for moving text box