refactored yiic