Create HW2_function