algorithm for golang