adding delete_record and renaming generate_view to generate_list_view