implemented prettier printing of the entire solution