almost finished with api