added functionality for writing to parallel