implement AdaptRecord function