added timeout to speed up process