some refactoring in singlebulbphotonbeam