Test function onLoad