updated for golang 1.1