CON-2249 & CON-2252

please put all magic numbers in variables with appropriate names and comments