moved routes inside controller