moved repeated values to global variables