New test, fixing up bugged code