Finished simple way to resolve matrix. Without randomize.