namespace case
removed phpunit
Refactored, better algorithm