create bill func