added document ready wait for loader