script for resaving data