first puzzle seemingly working (untested)