Working camera code