Added functionality to main.go