<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_ref(self, wordlist):
 		""" 		Adds a reference. 		"""

		refname = wordlist[0][:-1]

		if(refname in self.refs):
			raise ReferenceError("[line {}]:{} already defined here (word) {} (line) {}".format(self.line_count, 
						refname, self.refs[refname][0], self.refs[refname][1]))
		self.refs[refname] = (self.word_count, self.line_count)