refactoring view commands in part 3
refactoring part 3 view commands