almost done with api