modified for yii