removing unnecessary pattern