Fixing doctest
Add doctest to tutorial