switching hidden function