tried to use join in main function