Added a formula to the code. For the if else conditional.