added router and algorithm model