improve Data method to reduce cgo call counts