updating tostring method