migrating main to new structure