modify code for multiple cameras