changed printreceipt function