definitions refactor