public double get(int i, int j){
        if ((i>0)&&(i<=rows)&&(j>=0)&&(j<=columns)){
            return elements[i-1][j-1];
        }else{
            System.out.println("got wrong indices, or matrix was not initialized");
            return -1;
        }
    }