need to work out resource persistence