improve example with changing actor behavior based on configuration