view refactiring