It was correct, but I have changed the interface so it now expects negative integers