refactored to use constants