moving stuff to matrix_builder