sketch reactor loop