should this be:

`if to_env && version`

?