support for resourceState, more samples and consistency improvements.