changed filter clause to take in the property in the constructor