made some changes

comparison with matrix method
Merge pull request #1 from chandra-praneeth/master

made some changes