added missing calculation of u_l and u_r