Add subject class and add logic tablerowsdata