Try to improve this code !!!

  • Write test cases
  • Continous refactoring