def displayHits(hits):
	""" Handles the I/O of the song-searching functionality
	Parameters
	----------
		hits : list
			Holds json dictionaries with information of the songs that the
			search turned up

	Returns
	-------
		integer
		 	Either -1 if no song was chosen or the index in hits with the
			appropriate song's information

	"""
	for i in range(len(hits)):
		j=i+1
		print("{}: {}".format(j, hits[i]['result']['full_title']))
		if (j % 10 == 0 or j == len(hits)):
			cmd = input("{} more results.\nEnter your song's number to see it's lyrics, 'Exit' to go back or anything else to show more results: ".format((len(hits)-i)))
			if (cmd.isnumeric()):
				while (cmd.isnumeric() and int(cmd) > j):
					cmd = input("You haven't even seen that, how do you know it's the song you want!? Try again: ")
				return int(cmd) - 1
			elif (cmd.lower() == "exit"):
				return -1
	print("No more results for that search term")
	return -1