Combine two hz functions using Union type