completed object stitching code with testing cout statements