output done, code refactoring, algorithm badly optimize data