make pattern work