Promise pattern to handle multiple nested tasks