added timeout to listener