refactoring demo to routes