abstracting local data and receipt template out for easier reuse