*
finally got tail-recursion to work!