rewrote test for new api