move controller logic into board