refactoring, separate in files