refactoring for reuse variable decimalsQuantity