finished using dictionary structure