simplifying view code a bit, making resource code more fault tolerant