Added logic for lights