if condition to open resource to edit regatrdless if it has children or not
cleanup