changed if else block to a ternary because of how short and simple it is