reworking svinv calculator