added brightness detection to brightness controller