Updated deprecated code
Merge pull request #8 from nikhgupta/fix-deprecation

Fix deprecated code.