removed extraneous collect method in refactoring