handle document ready state