make insert() recursive