simple Promise utility

simplify the async task code