create Photopair class and make program work