adding insert fix function partially