modify to export RUN, RUN-MASTER and RUN-SLAVE functions