Call the correct function