add reactor pattern