Added method at() to the dynamicstate object to return a const reference