update timeout function