onload to on dom ready