reorganize a bit. rename functions
cleanup
cleanup
cleanup
wip