added coded to finx inverse and cache result