added callbacks for state vars
stuff