add functions for records manipulation