Adding loaded event

New event handler