refactor and change unnecessary static class and method