a few corrections. Working multi-gpu version.