Changed given/when to if/elseif structure.