updated photo handler