fix input call to write new elems