wrote spec and function for keys_of function of hash