--added nested hash functionality