changing codes to constants