Modify function onLoad