use window.function