drawing rectangles and lines