stitch functionality cleanup