vat and amount calculator refactored