Receive in main function