Modified _mergeArray function. Added RUN and STOP commands