changed "has_key" to "has_key?" on line 150 & 151