removed clean_matrix