Added functions for changing to RUN mode and changing to STOP mode