sorter.go - read,writer funciton done