using thread-safe collections for handlers and routes