remove some inner functions