code refactor
wip