Changed the interface to use unsigned instead of signed