some changes to work with Go