calc_charges expects to be passed a database handler, this wasnt happening, which...