moved a variable from main to toggletext

increased modularity