board building is now a function

for #1