Added concat function for stacks