modify IsmarketOpen function