replaced custom method with Collections.addAll