added the conditionals