changed method of persisting