change to window.toast