modified for two cameras