3rd attempt with camera function