A new upwind function in stabilized finite element formulations, using linear and quadratic elements for scalar convection-diffusion problems