Code edit - refactor helper