more complete numerical handling