add object functionality for nested hashes