took ifelse impl out of extra branch and just put it into another package