Added onload wrap