Added rectangle functionality.