fixed missing refactoring for main.go