updated to use constants