moved code around and formatted it
gocheck