change api to have less callbacks, as its prettier