added flashlight function