use simple join instead bizarre foreach construct