updates to filter and formatter so annotations appear in the correct places