added conditionals

added conditionals