refactoring action to work with yii2