updated rect constructor