update router logic