removes not required rows