implemented receipt validation