A flux-based modified method of characteristics