added key exists method