modified equation code