added history tracker, global constants