sorting out the add_record function call