moved onload to index