refactoring
added a handfull of testcases