refactored set state commands into bulb object