LU factorization function made and 3c done