update scope and promise example