add routing and fix syntax errors