wrapped solution in a defun