Implemented router functionality