refactorized some views