overriding valueOf and toString