fix expiry and add test