refactored not to be static methods