added concurrent version
Merge pull request #2 from danishabdullah/master

added concurrent version of the function