reading users & states through RPC
refactoring, better debug needed