Update sample with promises