fixed code to use wd promise api