added __str__ for printing
some minor fixes