loaded missing libraries.
implemented writing dataset.