added to_matrix function sig test