Cleaned up function call and filtering