refactoring of view class mechanism