adding pattern annotations