made code functional
Merge pull request #25 from bmaddy/master

made code functional