refactor view service