update code to use constants