add reactor
add type signature and inline run