initial refactor for nba