add state chart technique for loading data