add receipt build function