replace constant with instance var in routes file