refactoring, separate big files into small pieces