boiler plate code for foto stitch