set timeout
better timeout fcn