rethink
somewhat working stage
more fixes and tests
adding test cases
fix
fixes