now using TypedValue for arithmetic