updated fourth app code