refactor: optimize router