updated docstring. return string instead of prints in __str__