Making this more testable for the future