Yould also reduce this to a single return ternary operation.