clean up solution
solution in Common Lisp