modified some ints to unsigned int, compiler comparations