Lab 5: doctests and debugging

Doctests and debugging