start of tests rewrite (still need to remove yields)