renamed rect because of redefinition error