updated hash method to include members and keys