Implemented light function.