compute u as a matrix, unfinished
version 1
compute u as matrix