move main.go and uncomment writer.go