getting close to done the api wrapper