Fixed implementation
Merge pull request #30 from tassiahmed/working

Fixed implementation