monitor for state changes
write ranging sample