factored out rgb led code