added tab visibility event