Version where only functions are in main