move to promises for callback management