updated to work with go1.2