refactored into a define