initial tests
tests passed
now it really works
more consts
cleanup