finished func createResource in  Store