many updates, new abf.calc function