added asserts to dream and resources