setting service state and commands