added router code