added save capability plus some other stuff