Removed for-loop and replaced with Array.join hack