change the filter to a hash and applied auto-formating