remove two pieces of legacy codes