working on keyExists