refactor out chr info into struct