refactor consumer.go  / add comment function