Uses modid variable now