export prepare resouce functionality