switch to a promise implementation