tostring and print methods for testing