outsourced notify and started outsourcing tasks
  better naming
  new check "return_code_matches" and refactoring to case when