(U_pdate) fixed most bugs