added simple timeout