removed some irrelevant code from before do route