Moving receipt code to own util