added filtering and formating support when outputting data