added regularization grid, read and write file, need to test