led(x)
This is calling a function called led(), with the value in x. Is that really reasonable in your case?