added shown and hidden event