adding script logics