adding timeout to loading window