remove internal toPromise function