refactor success/failure notifications