camera code nearly done