Added a decorator to add calbacks and functions to filter duplicates