implemented som.inv