added promises
Merge branch 'master' into dev