refactor calculator, now it use the quantity defined in the data dictsend to the init