poking around
making code more readable at the price of cpu while working on #5
close #5 and big cleanup