Add promise snippet