added promises and testing agents