added check exists method