Completed solution method.