added stuff to allow persistence
added stuff to allow persistence