change ArrayList<String> commands to String[] commands