update API and comments for godoc