Modified method of characteristics