changed some int to unsigned for std::vector size comparisons