remove uncessary deadend code