changed ints to unsigned ints