refactor board into its own class