implemented keyExists method