refactor to record and protocol
merge