call correct version of function