Call correct function