adding toString and fromObject