get_fields.c: Added weighted sums. Turned off by default