added some conditions where isdeleted is true