changed ints to unsigned