abstracted autorecord function