cleaning up get_record