fix calc-contract to pass strings