call correct functions