print contents of a class