took a crack at the receipt problem