code factoring on points
adding support for ellipses
adding support for rectangles