finally got the photo gallery to work