some improvements
Merge pull request #7 from KruchDmitriy/torch

Some improvements