scaffolding for main function