loader iterate through data and separates it in two classes