more work on HSV state storage