correct same side of line logic.
fix rectangle constructors