drawing offset for height
corrected spacing
added retilt function
added valley test