Working version of squareTree using for comprehension

Still some trouble with explicit list processing version