remove some ugly code
remove some ugly code