bill function