formatted with fmt and performed golint suggestions