changed to search keys
updated to match implementation