expand() replaced with more optimal version
updated test cases after removing statistics and do_padding default value
Adding functions to dump matrix into a file