Implement flattenAgain (newly added to course)