implemented worker thread that invokes registered command handlers