Chnages the method in routes.