routing and litl refactor