better enum handling. Uses .toString() value.