homework2: add vector pass-by-reference; remove sorting