split ts file
refactoring