Added functionality to filter results based on availability