modded to return keyname along with value