solve removing adjecent elements