small class that creates object from hash (with recursion)