Used the mod method, faster