better implementation

@pswadi-zendesk thoughts? 

Despite this taking more lines, I think overall it makes things clearer.

If not we can go back to the ternary stuff.