Changed some interaction and added a matrix inverse checker