remove ugly code