changed handling of negative numbers, and loosened regex