first part of refactoring
refactoring part two
readme reformat