optimized str_join + added test to check