properly implemented the exists method for items