add resizing capability to insert