get rid off old ugly code