since the two branches of the conditional are so different, might be worth creating two distinct functions, otherwise it adds indirection for no benefit