fix concat function, add test