modified deleteCard method to not use a browser