refactored patterns view