added stitcher function