I think @jvazquez-r7 means your adding exactly one hash to the Array before returning it so there is no need for the Array. Just return the Hash. The other returns should be replaced with return nil (and proper checking in the calling methods)