implement record dissect/assemble algorithm