updated camera logic