Made general function to draw shapes