wip refactoring
wip
wip
bug fixes