put in resource check