rewrote tests a bit better/less error prone
rewrote a little loop, passes tests