whole paparazzi code is ported