add function for output main.go