add small function to move a rect