added WriteNumber method