revising length of keys array methods