using window.onload as a trigger event