refactored to use doseq