updating addRoute logic