#6 Implement onloadend