You should use size() instead of capacity() (noticed b/c a test failed)