udpated scripts including the show and hide function