refactor data routes to separate file