added methods to get the current loopState value