wrote content from array to fields