refactor calculator, now it use the quantity defined in the data dictsen...

...d to the init