4th attempt with camera function