simplified concatenation code