convert key to entity