moved timeout to variable