2nd attempt with camera function