new support for state in loader