Add a join-region function