first version without cgo