refactor ftw