added conditions to all variables