Updated APP code