added logic for exact match