takes in dictionary