changed window event to domready