use vector<T>::empty instead of size() compare