Added else conditional to code.