The use of the Riemann problem in finite difference schemes