minor adjustments, now test with api.