add code to assemble final image.