added threaded writing
added particles(?)