implement state load with new API