stated refactoring