Added methods to check for command data and copy it into a new array