cleanup.. HUGE REWRITE.. back to the drawing board