wrap the solution writer in a method