change 'onClose' function and it's params