added changes for rectangular