public static <T> boolean inThere(T elem, List<T> list){

        if(list.isEmpty()){
            return false;
        }
        if(list.get(0).equals(elem)){
            return true;
        }
        else{
            return inThere(elem,list.subList(1, list.size()));
        }
    }