applying Yii's magic