add hide_window fucntion