grouped functions in main