added support for negative numbers, a few tests