remove some goto