updated rect to rectangle