Added method to get first matching value