added some specs around if statements and set