implemented expiration date logic