reactor code