refactor to not use promises and to use standard success / error callbacks