Twisting and untwisting of twisted nematic elastomers