implementing settype for token and votestate variables