more efficient promiseEnd method generator