refactor in class. static methods