explanation callback and promise api