refactor, add view