Length of vectors counting and top n finding changed