basic functionality and collapsing records