update disparity map code