A new approach to the Hilbert function of a 0-dimensional projective scheme