Stuck on bad address problem in remove function.