make getCommandArray public