added toString and validate