prepare to call the function