added conditionals