fixing save function to use new field array