refactor sync.Mutext usage and remove unused field