adding dictionary update code