add routing and fix input field bug