moved pi calculation code to dboard()