refactoring, try to remove ctx from controller