function for extract the class name based on file name moved to utility class; refactoring classes for easier reuse