Use join instead of the loop