Data set saving added, needs to be tested