changed window load to document ready