add isDataExsit fuction before insert data