delete a unnecessary pattern match