rewrite tostring method