Nicer toNumber and fromNumber