rearrange
split into main method
refactor to make more function
unittests
refactor and genericise unittests
more tests
more tests