U_in_1_sampled_X and Y were added to the code, also U_in_1 and U_in_2 were put together for clearance and consistency