added folding for record view