Updated leds function

not finished yet!