added an exists method