method function and call function