wip - refactor