modified Insert

Did some modifications in the Insert part