refine the usage of IOC