add preconditions for resource handling