tested stopping timeout function