simplified version with Golang support