WIP
refactor code needing version