implement sorting algorithm in go