added index argument to WebcamInput