did a fancy if else instead