making the webcam dialog function a bit better