official Date: 2001-10-12 Author: Bill Naylor Note that N is not right, since weights can be negative