adding app.rehydrate method