additions for drawing rectangle with coordinates