refactoring helpers + controller de test