created code to pickle dictionary