refactor WIP continued