working on data loop