maybe calcInverse is wrong