Updated code to Go 1.2