add code to save from params