changed to document ready for firefox