implemented required feature
removed unused variable
replace for loop by _.each
Merge pull request #7 from vondacho/master

Implementation of required feature