setting up camera before loop