refactored nested views