changed router to initialize single parser in pattern class