change timeout to interval