changing features extraction, to compute everything in cpp