read and write to spec