Implemented a basic routing functionality