refactored to subviews