Still WIP: Test not passing; apparently stuck in infinite loop
WIP: found the problem, it was a typo which did an incorrect assignment