add write to board func