fixes and updates to class rectangle