added router functionality