refactoring for namespace and psr4