new callback onHide & reworked callback passing method