migration script for old to new