add first somewhat functional api

still needs work, but now we have some full blown tests