further changes for webcam support