WIP: initial attempt at a dynamic if