toggle case function added