refactoring to remove over use of constants