public Boolean checkType(int type){
        
        for(int i=0; i<types.length;i++){
            if (type == types[i]){
                return true;
            }
        }
        return false;
    }