implement overflow handling for insert()