recursive to_hash