improved docstring and printout