migrated code structure