[educational] promise pattern impl