script to create HDR