refactored test callbacks to escape callback hell