implement migration main
remove redundant variable