moving square to rectangle