Added routing using a non-blocking function.