Added getCommandtype