changes refactor insert overwrite on first time
insert overwrite only on first time