fork and modified

Just modified for Golang