updated remove adjacent, did not utilize sets, not sure if this is a 'better' solution however