adjusted the status, added a db entry exist check before insert.