adding extra check for insert script