Added functionality to automatically filter results