uses config variable for insert