resource to state