single photon run complete and functional; need to compile with -std=c+11 option