fixed loop and coords, and reworked corner generating.  line may need to be generated twice