it seems like you might be able to remove the `else` below in favor of this, it looks more general, no?