adding a concatenation of bit arrays function