Added rectangle drawing function