refactored so its by topic