added debugging in insert