add timeout for call function