Pull out duplicated code from call and invoke