mexican hat weights work fine now. The function is correct.