Added function for lightning