Finished adding and searching function of dictionary