A new algorithm for constraint satisfaction problems with few subpowers templates