renamed to_matrix() -> matrix()