working r2 but very slow