change from promise-style to callback-style