adding Page Visibility API